package com.ggb.reactive.domain.entity

import com.fasterxml.jackson.annotation.JsonFormat
import io.swagger.v3.oas.annotations.media.Schema
import lombok.AllArgsConstructor
import lombok.Builder
import lombok.Data
import lombok.NoArgsConstructor
import org.springframework.data.annotation.Id
import org.springframework.data.relational.core.mapping.Table
import java.time.Instant


@Table("employee")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(title="用户实体 Employee")

data class Employee (
    @Id
    val id: Long? = null,

    @Schema(description = "姓名")
    val name: String? = null,

    @Schema(description = "用户名")
    val username: String? = null,

    @Schema(description = "手机号")
    val phone: String? = null,

    @Schema(description = "性别 0 女 1 男")
    val sex: String? = null,

    @Schema(description = "身份证号")
    val idNumber: String? = null,

    @Schema(description = "注册时间", pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT-6")
    var createTime: Instant? = null,

    @Schema(description = "更新时间", pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT-6")
    var updateTime: Instant? = null,

    @Schema(description = "状态")
    var status: Int? = null,

    @Schema(description = "密码")
    var password: String? = null
)

